package vcp.client.GUI.mvc.controller;

import vcp.client.GUI.mvc.model.UIAbstractModel;
import vcp.client.GUI.mvc.view.UIAbstractView;
import vcp.client.GUI.mvc.view.UIDemoView;
import vcp.enums.Screen;

/**
 * 
 * @author VCP team
 * 
 *         <p>
 *         Demo controller, manages 2 different paths of VCP application
 *         </p>
 *         responsible <b> <u>only</u> </b> for the Demo screen management
 * 
 * @see UIDemoView
 */
public class UIDemoController extends UIAbstractController
{
	/**
	 * Application Demo panel
	 */
	private final UIDemoView view;

	/**
	 * 
	 * @param view
	 *            : Demo GUI panel
	 */
	public UIDemoController ( UIDemoView view )
	{
		super(Screen.DEMO);
		this.view = view;

		this.setupListeners();
	}

	/**
	 * reset the view
	 */
	public void reset ()
	{
		this.view.resetView();
	}

	// ****************************************************************************************************************************
	// UIAbstractController methods
	// ****************************************************************************************************************************
	@Override
	public UIAbstractView getView ()
	{
		return this.view;
	}

	@Override
	public UIAbstractModel getModel ()
	{
		return null;
	}

	@Override
	public void clearMVC ()
	{
		this.view.clearView();
	}

	@Override
	protected void setupListeners ()
	{
		this.view.setControllerDelegate(this);
	}

}
